/*
 * This class represents a single cell in the model of our network simulation.
 */
package simulator.network;

import java.util.ArrayList;

/**
 *
 * @author Pascal Schwenke <pascal.schwenke@gmail.com>
 */
public class Cell {
    //identifier
    int id;
    //the type of cell e.g. highway, city...
    String type;
    //aka x coord
    double longitude;
    //aka y coord
    double latitude;
    //the current users in the cell
    
    float userCount;
    //the neighboring cells
    String[] neighbors;

    public Cell(int id, String type, double longitude, double latitude, float userCount) {
        this.id = id;
        this.type = type;
        this.longitude = longitude;
        this.latitude = latitude;
        this.userCount = userCount;
        this.neighbors = null;
    }
    
    public Cell(String type, double longitude, double latitude, float userCount) {
        this.type = type;
        this.longitude = longitude;
        this.latitude = latitude;
        this.userCount = userCount;
        this.neighbors = null;
    }

    public Cell(int id, String type, double longitude, double latitude, float userCount, String[] neighbors) {
        this.id = id;
        this.type = type;
        this.longitude = longitude;
        this.latitude = latitude;
        this.userCount = userCount;
        this.neighbors = neighbors;
    }

    public void SetNeighbors(String[] neighbors) {
        this.neighbors = neighbors;
    }

    public int GetNeighborCount() {
        return neighbors.length;
    }

    public int GetLongitude() {
        return (int) longitude;
    }

    public int GetLatitude() {
        return (int) latitude;
    }
}
